Skip to content

Conversation

FelonEkonom
Copy link
Member

No description provided.

@FelonEkonom FelonEkonom self-assigned this Apr 9, 2025
@FelonEkonom FelonEkonom requested a review from varsill April 9, 2025 14:40
@FelonEkonom FelonEkonom changed the title Implement transcoding_policy option transcoding_policy option Apr 9, 2025
@FelonEkonom FelonEkonom moved this to In Review in Smackore Apr 9, 2025
@FelonEkonom FelonEkonom moved this from In Review to In Progress in Smackore Apr 9, 2025
@FelonEkonom FelonEkonom marked this pull request as draft April 9, 2025 14:41
@FelonEkonom FelonEkonom marked this pull request as ready for review April 10, 2025 07:36
spec:
:always
| :if_needed
| :never
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks a bit off to me, having a transcoder with transcoding_policy: :never :D Let's try thinking about
other option name, perhaps emphasising somehow that there are "heavy" operations and "light operations" would be helpful here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, my first idea was to add forbid_transcoding? flag next to the force_transcoding?, then I thought that transcoding_policy will sound much better that these 2 combined. Do you propose any specific option name and values?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Option could be called something like :heavy_operations_policy, or perhaps we should rename the bin since it not only does transcoding

* a boolean,
* a function that receives the input stream format and returns a boolean.
* an atom: `:always`, `:if_needed` (default) or `:never`,
* a function that receives the input stream format and returns an atom.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* a function that receives the input stream format and returns an atom.
* a function that receives the input stream format and returns the atom.

or perhaps it would be even better if you listed all the atoms once again

If set to `:never`, the input media stream won't be neither decoded nor transcoded.
Changing alignment, encapsulation or stream structure is still possible. This option
is helpful when you want to ensure that #{inspect(__MODULE__)} will not use too much
of resources, e.g. CPU or memory.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please mention that transcoder will fail if the output format doesn't match input.

stream format and the output stream format are different types.
This is the default behavior.
If set to `:never`, the input media stream won't be neither decoded nor transcoded.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It won't be encoded either, for instance in scenario with input: RawVideo and output: H264

Co-authored-by: Łukasz Kita <lukasz.kita0@gmail.com>
@FelonEkonom FelonEkonom requested a review from varsill April 10, 2025 09:26
@FelonEkonom FelonEkonom merged commit 07a2abd into master Apr 10, 2025
3 checks passed
@FelonEkonom FelonEkonom deleted the transcoding_policy branch April 10, 2025 10:13
@github-project-automation github-project-automation bot moved this from In Progress to Done in Smackore Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants